export BITS

        BITS := 64
        UTS_MACHINE := x86_64

        KBUILD_CFLAGS += -mcmodel=kernel
LDFLAGS := -m elf_$(UTS_MACHINE)

head-y := arch/x86/kernel/head_$(BITS).o
head-y += arch/x86/kernel/head$(BITS).o
head-y += arch/x86/kernel/head.o
head-y += arch/x86/kernel/init_task.o

libs-y  += arch/x86/lib/
# See arch/x86/Kbuild for content of core part of the kernel
core-y += arch/x86/

boot := arch/x86/boot

PHONY += bzImage 

# Default kernel to build
all: bzImage

# KBUILD_IMAGE specify target image being built
KBUILD_IMAGE := $(boot)/bzImage

bzImage: vmlinux
	$(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE)

archclean:
	$(Q)$(MAKE) $(clean)=$(boot)

